class Task < ActiveRecord::Base

  belongs_to :lesson
  has_many :answers
  
  validates_presence_of :title
  validates_presence_of :description
  validates_presence_of :dateline
  validates_presence_of :value
  validates_presence_of :lesson
  
  validates_uniqueness_of :title, :scope => [:title,:lesson_id]
  
end
